package example.com.zyfypt_618zgm.model;


import retrofit2.Call;

import example.com.zyfypt_618zgm.iface.Registeriface;
import example.com.zyfypt_618zgm.service.RegisterService;
import retrofit2.Retrofit;
import retrofit2.converter.scalars.ScalarsConverterFactory;

/**
 * Created by 小茗同学 on 2017/6/1.
 */

public class RegisterModel implements Registeriface {
    private Retrofit retrofit;
    private String BASEURL="http://amicool.neusoft.edu.cn/";

    public RegisterModel() {
        retrofit =new Retrofit.Builder().baseUrl(BASEURL).addConverterFactory(ScalarsConverterFactory.create()).build();
    }

    @Override
    public Call<String> getResult(String username, String password, String tel) {
        RegisterService registerservice =retrofit.create(RegisterService.class);
        return registerservice.reg(username,password,tel);
    }
}
